home *** CD-ROM | disk | FTP | other *** search
/ Interactive Media Design Review 1999 / Interactive Media Design Review 1999.iso / pc / allfiles / Itch / work_info / flycycle.dcr / 00004_flyParent.ls < prev    next >
Encoding:
Text File  |  1999-03-07  |  1.4 KB  |  66 lines

  1. property posH, posV, sp, cstNum, cstNam, speedH, speedV, orbitH, orbitV, orbSpeed, whchDir
  2. global flyList, spFlyList, spBox, offset, spCow, orbFlag, flyMidPos, spRing
  3.  
  4. on new me, asp, aPosH, aPosV, aCstNam, aSpdH, aSpdV, aOrbH, aOrbV, aOrbSpd, aDir
  5.   sp = asp
  6.   posH = aPosH
  7.   posV = aPosV
  8.   cstNam = aCstNam
  9.   cstNum = the number of member cstNam
  10.   speedH = aSpdH
  11.   speedV = aSpdV
  12.   orbitH = aOrbH
  13.   orbitV = aOrbV
  14.   orbSpeed = aOrbSpd
  15.   whchDir = aDir
  16.   SwapPic(me)
  17.   FlyPos(me)
  18.   puppetSprite(sp, 1)
  19.   set the backColor of sprite sp to 0
  20.   set the foreColor of sprite sp to 255
  21.   set the ink of sprite sp to 36
  22.   set the blend of sprite sp to 100
  23.   return me
  24. end
  25.  
  26. on SwapPic me
  27.   cstNum = the number of member cstNam
  28.   set the memberNum of sprite sp to cstNum
  29.   updateStage()
  30. end
  31.  
  32. on FlyPos me
  33.   set the locH of sprite sp to posH
  34.   set the locV of sprite sp to posV
  35. end
  36.  
  37. on kill me
  38.   if not soundBusy(2) then
  39.     puppetSound(2, member("Zap"))
  40.   end if
  41.   cstNam = "Fly2"
  42.   SwapPic(me)
  43.   Wait(1)
  44.   posH = -1000
  45.   FlyPos(me)
  46.   add(spFlyList, sp)
  47.   temp = getPos(flyList, me)
  48.   deleteAt(flyList, temp)
  49. end
  50.  
  51. on orbit me
  52.   global orbCounter
  53.   if orbFlag = 1 then
  54.     orbCounter = orbCounter + 1
  55.     if orbCounter > 30 then
  56.       orbitV = orbitV + 2
  57.       orbCounter = 0
  58.     end if
  59.   end if
  60.   temp1 = flyMidPos
  61.   temp2 = the locV of sprite spCow
  62.   posH = temp1 + (orbitH * sin(the ticks / orbSpeed))
  63.   posV = temp2 + (orbitV * cos(the ticks / orbSpeed))
  64.   FlyPos(me)
  65. end
  66.